<!-- #include file="p_include.asp" --><%
'************************************
' Powered by ThemePluginEditor 1.1
' zsx http://www.zsxsoft.com
'************************************
Dim ImpBlue_theme(1)
ImpBlue_theme(0)=Array("站点描述1","站点描述2","站点描述3","Logo(158x37)","关于","首页产品展示分类ID，多个分类用英文逗号分隔。","首页列表项分类ID，建议设置3个分类。")
ImpBlue_theme(1)=Array("design1.asp","design2.asp","design3.asp","logo.png","me.asp","catid.html","catnewsid.html")

Call RegisterPlugin("ImpBlue","ActivePlugin_ImpBlue")

Function ActivePlugin_ImpBlue()
  '如果插件需要include代码，则直接在这里加。
  Call Add_Response_Plugin("Response_Plugin_Admin_Top",MakeTopMenu(1,"主题配置",BlogHost & "zb_users/theme/ImpBlue/plugin/editor.asp","aImpBlueManage",""))
	'这里加文件管理
	If CheckPluginState("FileManage") Then
		Call Add_Action_Plugin("Action_Plugin_FileManage_ExportInformation_NotFound","ImpBlue_exportdetail(""{path}"",""{f}"")")
	End If
  '这里是给后台加管理按钮
  If BlogVersion<=121028 Then Call Add_Response_Plugin("Response_Plugin_ThemeMng_SubMenu","<script type='text/javascript'>$(document).ready(function(){$(""#theme-ImpBlue .theme-name"").append('<input class=""button"" style=""float:right;margin:0;padding-left:10px;padding-right:10px;"" type=""button"" value=""配置"" onclick=""location.href=\'"&BlogHost&"zb_users/theme/ImpBlue/plugin/editor.asp\'"">')})</script>")
End Function

Function ImpBlue_Path(name,p)
  Dim MyPath
  MyPath = IIf(p = "url",BlogHost,BlogPath)
  MyPath = MyPath & "zb_users\theme\ImpBlue\"
  Select Case name
    Case "include"
      MyPath = MyPath & "include"
    Case "var"
      MyPath = MyPath & "plugin\var"
    Case "main"
      MyPath = MyPath & "plugin\editor.asp"
    Case Else
      MyPath = MyPath & name
  End Select
  If p = "url" Then
    MyPath = Replace(MyPath,"\","/")
  End If
  ImpBlue_Path = MyPath
End Function

Function InstallPlugin_ImpBlue()
  If CheckPluginState("xnxf_CMS")=False Then Call ShowError(48)
  If Not PublicObjFSO.FolderExists(ImpBlue_Path("include","")) Then
    PublicObjFSO.CopyFolder ImpBlue_Path("var",""), ImpBlue_Path("include","")
    Call CMS_Build(false)
    Call SetBlogHint(True,Empty,Empty)
  End If
  ' Response.Redirect ImpBlue_Path("main","")
	'用户激活插件之后的操作

End Function

Function ImpBlue_cfg()
  ' Set cfg = New TConfig
  ' cfg.Load "cfg_cfg"
  ' If cfg.Exists("ver")=False Then
    ' cfg.Write "ver","1.0"
    ' cfg.Write "Products",""
    ' cfg.Write "CateList",""
    ' cfg.Save
  ' End If
  ' Set ImpBlue_cfg = cfg
End Function 

Function ImpBlue_exportdetail(p,f)
	On Error Resume Next
	dim z,k,l,i
	z=LCase(f)
	k=LCase(p)
	l=lcase(blogpath)
	k=IIf(Right(k,1)="\",Left(k,Len(k)-1),k)
	l=IIf(Right(l,1)="\",Left(l,Len(l)-1),l)
	if k=l & "\zb_users\theme\ImpBlue\include" Then
		For i=0 To Ubound(ImpBlue_theme(1))
			If ImpBlue_theme(1)(i)=z Then ImpBlue_exportdetail=ImpBlue_theme(0)(i)
		Next
	End If
End Function
%>